A Purely Logical Approach to Program Termination

نویسندگان

  • Mădălina Eraşcu
  • Tudor Jebelean
چکیده

We present our work in progress concerning the logical foundations of the analysis of termination for imperative recursive programs. The analysis is based on forward symbolic execution [12] and functional semantics. The distinctive feature of our approach is the formulation of the termination condition as an induction principle developed from the structure of the program with respect to iterative structures (recursive calls and while loops). Moreover the termination condition insures the existence and the uniqueness of the function implemented by the program. Note that the existence is not automatic, because a recursive program corresponds, logically, to an implicit definition. It is interesting that this inductive termination condition can be also used for proving the uniqueness of the function as well as the total correctness of the program. We show in this paper how to prove the existence of the implemented function in the case of single recursion programs (programs with at most one recursive call on each branch). The method can be applied however to all imperative recursive programs, where recursive calls are outside the loops. For other programs, termination analysis appears to involve co-recursive functions and it is subject to further investigation. The methods presented here are under implementation in the Theorema system [2].

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Purely Logical Approach to Imperative Program Verification

We present a method for the generation of the verification conditions for the total correctness of imperative programs containing nested loops with abrupt termination statements, and we illustrate it on several examples. The conditions are (first-order) formulae obtained by certain transformations of the program text. The loops are treated similarly to calls of recursively defined functions. Th...

متن کامل

An Integrated Logic for Termination and Non-Termination Reasoning

We propose a logical framework for specifying and proving assertions about program termination and non-termination. Although program termination has been well studied, it is usually added as an external component to a specification logic. Here we propose to integrate termination requirements directly into our specification logic, as temporal constraints for each execution phase of every method....

متن کامل

Why Can't You Behave? Non-termination Analysis of Direct Recursive Rules with Constraints

This paper is concerned with rule-based programs that go wrong. The unwanted behavior of rule applications is non-termination or failure of a computation. We propose a static program analysis of the non-termination problem for recursion in the Constraint Handling Rules (CHR) language. CHR is an advanced concurrent declarative language involving constraint reasoning. It has been closely related ...

متن کامل

Mathematically Structured but not Necessarily Functional Programming ( Extended Abstract )

Realizability is an interpretation of intuitionistic logic which subsumes the Curry-Howard interpretation of propositions as types, because it allows the realizers to use computational effects such as non-termination, store and exceptions. Therefore, we can use realizability as a framework for program development and extraction which allows any style of programming, not just the purely function...

متن کامل

Local Termination: theory and practice

The characterisation of termination using well-founded monotone algebras has been a milestone on the way to automated termination techniques, of which we have seen an extensive development over the past years. Both the semantic characterisation and most known termination methods are concerned with global termination, uniformly of all the terms of a term rewriting system (TRS). In this paper we ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010